<template>
	<view class="">
		<view class="user_top">
			<view class="user_top_infor" v-if="data_value != ''">
				<image :src="data_value.avatar" mode=""></image>
				{{data_value.nickname}}
			</view>
		</view>
		<view class="user_box">
			<view class="user_box_content">
				<view class="user_box_content_h2">
					
					{{ $t("message.wdfw") }} 
				</view>
				<view class="user_box_content_ydjl" @click="yundan()">
					<view class="">
						<image src="https://9288rus.com.82.kssite.cn/uploads/20240417/1f724b7ed93eac35ab95949fa2f62d1c.png" mode=""></image>
						
						{{ $t("message.ydjl") }} 
					</view>
					<u-icon name="arrow-right" size="30rpx"></u-icon>
				</view>
			</view>
			<button @click="sin()" >
				{{ $t("message.tuichu") }} 
			</button>
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data_value:{}
			}
		},
		onShow() {
			let _this=this
			if(uni.getStorageSync("token")){
				
			}else{
				uni.navigateTo({
					url:"/pages/login/login"
				})
			
			}
			if(uni.getStorageSync('lang')=='en'){
				uni.setTabBarItem({
				      index: 1,
				      text: _this.$t('message.table.my')
				});
				uni.setTabBarItem({
				      index: 0,
				      text: _this.$t('message.table.index')
				});
			}else{
				uni.setTabBarItem({
				      index: 1,
				      text: _this.$t('我的')
				});
				uni.setTabBarItem({
				      index: 0,
				      text: _this.$t('首页')
				});
			}
			this.data_value=uni.getStorageSync("information")
		},
		methods: {
			sin(){
				uni.removeStorageSync("token")
				uni.removeStorageSync("information")

				uni.navigateTo({
					url:"/pages/login/login"
				},500)
			},
			yundan(){
				uni.navigateTo({
					url:"/pages/record/record"
				})
			}
		}
	}
</script>

<style scoped lang="less">
	.user_top{
		height: 319rpx;
		background: #4CCFA7;
		position: relative;
	}
	.user_box{
		min-height: 100vh;
		padding: 30rpx 20rpx;
		background: linear-gradient(0deg, #F9F9F9, #DCF0E3);
	}
	.user_box>button{
		width: 502rpx;
		height: 92rpx;
		background: #F9F9F9;
		border-radius: 45rpx;
		font-weight: 400;
		font-size: 36rpx;
		color: #333333;
		border: 2rpx solid #333333;
		margin-top:303rpx;
		
	}
	.user_box_content{
		background: #FFFFFF;
		border-radius: 10px;
		padding: 47rpx  0 34rpx;
	}
	.user_box_content_h2{
		font-weight: 500;
		font-size: 36rpx;
		color: #000000;
		position: relative;
		overflow: hidden;
		padding-left: 30rpx;
		padding-bottom: 37rpx;
		border-bottom: 1rpx solid #EEEEEE;
	}
	.user_box_content_h2::after{
		width: 20rpx;
		height: 20rpx;
		content: "";
		background: #0F773A;
		position: absolute;
		left: -10rpx;
		top: calc(50% - 23.5rpx) ;
		transform: translate(0,-50%);
		border-radius: 50%;
	}
	.user_box_content_ydjl{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 40rpx 10rpx 0 ;
	}
	.user_box_content_ydjl>view{
		display: flex;
		align-items: center;	
		font-weight: 400;
		fort-size: 28rpx;
		color: #333333;
	}
	.user_box_content_ydjl image{
		width: 40rpx;
		height: 40rpx;
		margin-right: 15rpx;
	}
	.user_top_infor{
		position: absolute;
		bottom: 32rpx;
		left: 20rpx;
		display: flex;
		align-items: center;
		font-weight: bold;
		font-size: 40rpx;
		color: #FFFFFF;
	}
	.user_top_infor>image{
		margin-right: 21rpx;
		width: 130rpx;
		height: 130rpx;
		background: radial-gradient(circle, #EEFAF2, #FFFFFF);
		box-shadow: 0px 5rpx 6rpx 0px rgba(2,72,43,0.21);
		border-radius: 50%;
		border: 4px solid rgba(220,240,227,0.4);
	}
</style>
